//
//  ZDQRCodeConfiguration.m
//  ZDQRCodeManager
//
//  Created by mac on 2019/10/28.
//  Copyright © 2019 北京定辉文化传媒有限公司. All rights reserved.
//

#import "YSQRCodeConfiguration.h"
#import <AVFoundation/AVFoundation.h>

@implementation YSQRCodeConfiguration

+ (instancetype)shareConfiguration {
    
    static YSQRCodeConfiguration *configuration;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        configuration = [[YSQRCodeConfiguration alloc] init];
    });
    return configuration;
}

- (instancetype)init {
    
    self = [super init];
    if (self) {
        [self defaultConfiguration];
    }
    return self;
}

- (void)defaultConfiguration {

    self.sampleBufferNotify = YES;
    self.sessionPreset = AVCaptureSessionPreset1920x1080;
    self.metadataObjectTypes = @[AVMetadataObjectTypeQRCode];
}

@end
